#!/bin/bash


touch ~/.pip/pip.conf
echo -E """
[global]
timeout = 6000
index-url = http://pypi.douban.com/simple/
[install]
use-mirrors = true
mirrors = http://pypi.douban.com/simple/
trusted-host = pypi.douban.com
"""   > ~/.pip/pip.conf

sudo apt-get install python-pip python-dev python-virtualenv nvidia-cuda-toolkit
pip install --upgrade pip
sudo -H pip install --upgrade virtualenv



###########################################



sudo apt-get install python-pip python-dev  python-virtualenv

export HTTP_PROXY=http://109.105.1.52:8080

git clone https://github.com/tensorflow/tensorflow.git

DIT_TENSORFLOW=$HOME/tensorflow

virtualenv --system-site-packages -p python3 $DIT_TENSORFLOW

source $DIT_TENSORFLOW/bin/activate

cd $DIT_TENSORFLOW

pip install --proxy http://109.105.1.52:8080 --trusted-host pypi.python.org --upgrade pip

pip install --proxy http://109.105.1.52:8080 --trusted-host pypi.python.org --upgrade http://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=cpu-slave/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow-1.0.1-cp27-cp27mu-linux_x86_64.whl     http://storage.googleapis.com/tensorflow/linux/cpu/protobuf-3.2.0-cp27-none-linux_x86_64.whl   six keras pycuda nose h5py


pip install --proxy http://109.105.1.52:8080 --trusted-host pypi.python.org --upgrade http://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.2.0rc2-cp27-none-linux_x86_64.whl      http://storage.googleapis.com/tensorflow/linux/cpu/protobuf-3.2.0-cp27-none-linux_x86_64.whl   six keras pycuda nose h5py jieba pandas

pip install --proxy http://109.105.1.52:8080  --upgrade  cython word2vec matplotlib sklearn




